Week 8
Milestones
- Integrating APIs to create credentials/documents into the registry
Milestone 1 : Integrating APIs to create credentials into the registry
In the previous week, we have already anchored schema and registry to the CORD network.Now in order to anchor documents to the cord network, I created this function which adds on the registry_id and schema_id returned by issuer_agent.
Screenshots
When you hit the api/v1/Schema
endpoint
This is the code segment I added
/**Binding schema id & registry id to schema */
((ObjectNode)rootNode).set("cord_schema_id", schemaId.get("schemaId"));
((ObjectNode)rootNode).set("cord_registry_id", registryId.get("registryId"));
newRootNode.set(entityName, rootNode);
logger.info("NEW NODE : {}",newRootNode);
Now once this is done the schema is stored as :
{
"schema": "{...}"
"cord_schema_id": "s586a2243-d2b4-4d89-8a89-bc2cca489202",
"cord_registry_id": "r882d97fb-100e-4f1d-82fd-3fbb314ab686",
"osUpdatedAt": "2023-08-31T19:21:10.991Z",
"osCreatedAt": "2023-08-31T19:21:10.991Z",
"osUpdatedBy": "81736ba1-dcfe-4888-b092-fb2f98e3bbcc",
"name": "Cred",
"osCreatedBy": "81736ba1-dcfe-4888-b092-fb2f98e3bbcc",
"osid": "1-b193e8c5-d2c8-414f-96f0-acde7f3968ff",
"osOwner": [
"81736ba1-dcfe-4888-b092-fb2f98e3bbcc"
]
}